package org.management.system.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.management.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;

/**
 * 功能描述
 * 附件模块
 * @author jiangyan
 * @date 2019/03/14
 * @description
 * @project management
 */
@Data
@ApiModel(value="附件")
@EqualsAndHashCode(callSuper = true)
@Table(name = "sys_file")
public class FileEntity extends BaseEntity {
    /**
     * 文件名称
     */
    @Column(name = "FILE_NAME")
    @NotEmpty(message = "文件名称不能为空")
    @ApiModelProperty(value = "文件名称",name = "fileName", required = true)
    private String fileName;

    /**
     * 父级ID
     */
    @Column(name = "PARENT_ID")
    @ApiModelProperty(value = "父级ID",name = "parentId")
    private String parentId;

    /**
     * 业务ID
     */
    @Column(name = "OBJECT_ID")
    @ApiModelProperty(value = "业务ID",name = "objectId")
    private String objectId;

    /**
     * 文件大小
     */
    @Column(name = "FILE_SIZE")
    @ApiModelProperty(value = "文件大小",name = "fileSize")
    private String fileSize;

    /**
     * 文件后缀
     */
    @Column(name = "SUFFIX")
    @ApiModelProperty(value = "文件后缀",name = "suffix")
    private String suffix;

    /**
     * 文件类型 1.file 文件夹 2.dir
     */
    @Column(name = "FILE_TYPE")
    @ApiModelProperty(value = "文件类型 1.file 文件夹 2.dir",name = "fileType")
    private String fileType;

    /**
     * 是否只读
     */
    @Column(name = "READ_ONLY")
    @ApiModelProperty(value = "是否只读",name = "readOnly")
    private Boolean readOnly;

    /**
     * 相对路径
     */
    @Column(name = "RELATIVE_PATH")
    @ApiModelProperty(value = "相对路径",name = "relativePath")
    private String relativePath;
}